package com.music.order.controller.web;

import com.music.common.core.web.controller.BaseController;
import com.music.common.core.web.domain.AjaxResult;
import com.music.order.domain.OrderMusic;
import com.music.order.service.OrderMusicService;
import com.music.order.vo.OrderMusicVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * 订单音乐列表Controller
 * 
 * @author ruoyi
 * @date 2024-10-22
 */
@RestController
@RequestMapping("/ordermusic/web")
public class OrderMusicWebController extends BaseController {
    @Autowired
    private OrderMusicService orderMusicService;

    /**
     * 查询订单音乐列表列表
     */
//    @RequiresPermissions("order:ordermusic:list")
    @GetMapping("/find")
    public AjaxResult find(HttpServletRequest request, Long orderId){
        OrderMusic orderMusic = new OrderMusic();
        orderMusic.setOrderId(orderId);

        List<OrderMusicVo> orderMusicList = orderMusicService.selectOrderVoMusicList(orderMusic);
        return AjaxResult.success(orderMusicList);
    }

}
